Optimal. Leaf size=288 \[ \frac {b e^4 n \log \left (1-\frac {d}{d+\frac {e}{\sqrt {x}}}\right ) \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{d^4}+\frac {b e^3 n \sqrt {x} \left (d+\frac {e}{\sqrt {x}}\right ) \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{d^4}-\frac {b e^2 n x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{2 d^2}+\frac {b e n x^{3/2} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{3 d}+\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2-\frac {b^2 e^4 n^2 \text {Li}_2\left (\frac {d}{d+\frac {e}{\sqrt {x}}}\right )}{d^4}+\frac {5 b^2 e^4 n^2 \log \left (d+\frac {e}{\sqrt {x}}\right )}{6 d^4}+\frac {11 b^2 e^4 n^2 \log (x)}{12 d^4}-\frac {5 b^2 e^3 n^2 \sqrt {x}}{6 d^3}+\frac {b^2 e^2 n^2 x}{6 d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.64, antiderivative size = 311, normalized size of antiderivative = 1.08, number of steps used = 18, number of rules used = 12, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {2454, 2398, 2411, 2347, 2344, 2301, 2317, 2391, 2314, 31, 2319, 44} \[ \frac {b^2 e^4 n^2 \text {PolyLog}\left (2,\frac {e}{d \sqrt {x}}+1\right )}{d^4}-\frac {e^4 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{2 d^4}+\frac {b e^4 n \log \left (-\frac {e}{d \sqrt {x}}\right ) \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{d^4}+\frac {b e^3 n \sqrt {x} \left (d+\frac {e}{\sqrt {x}}\right ) \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{d^4}-\frac {b e^2 n x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{2 d^2}+\frac {b e n x^{3/2} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{3 d}+\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2-\frac {5 b^2 e^3 n^2 \sqrt {x}}{6 d^3}+\frac {b^2 e^2 n^2 x}{6 d^2}+\frac {5 b^2 e^4 n^2 \log \left (d+\frac {e}{\sqrt {x}}\right )}{6 d^4}+\frac {11 b^2 e^4 n^2 \log (x)}{12 d^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 44
Rule 2301
Rule 2314
Rule 2317
Rule 2319
Rule 2344
Rule 2347
Rule 2391
Rule 2398
Rule 2411
Rule 2454
Rubi steps
\begin {align*} \int x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2 \, dx &=-\left (2 \operatorname {Subst}\left (\int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{x^5} \, dx,x,\frac {1}{\sqrt {x}}\right )\right )\\ &=\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2-(b e n) \operatorname {Subst}\left (\int \frac {a+b \log \left (c (d+e x)^n\right )}{x^4 (d+e x)} \, dx,x,\frac {1}{\sqrt {x}}\right )\\ &=\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2-(b n) \operatorname {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x \left (-\frac {d}{e}+\frac {x}{e}\right )^4} \, dx,x,d+\frac {e}{\sqrt {x}}\right )\\ &=\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2-\frac {(b n) \operatorname {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{\left (-\frac {d}{e}+\frac {x}{e}\right )^4} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d}+\frac {(b e n) \operatorname {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x \left (-\frac {d}{e}+\frac {x}{e}\right )^3} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d}\\ &=\frac {b e n x^{3/2} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{3 d}+\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2+\frac {(b e n) \operatorname {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{\left (-\frac {d}{e}+\frac {x}{e}\right )^3} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d^2}-\frac {\left (b e^2 n\right ) \operatorname {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x \left (-\frac {d}{e}+\frac {x}{e}\right )^2} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d^2}-\frac {\left (b^2 e n^2\right ) \operatorname {Subst}\left (\int \frac {1}{x \left (-\frac {d}{e}+\frac {x}{e}\right )^3} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{3 d}\\ &=-\frac {b e^2 n x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{2 d^2}+\frac {b e n x^{3/2} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{3 d}+\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2-\frac {\left (b e^2 n\right ) \operatorname {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{\left (-\frac {d}{e}+\frac {x}{e}\right )^2} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d^3}+\frac {\left (b e^3 n\right ) \operatorname {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x \left (-\frac {d}{e}+\frac {x}{e}\right )} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d^3}-\frac {\left (b^2 e n^2\right ) \operatorname {Subst}\left (\int \left (-\frac {e^3}{d (d-x)^3}-\frac {e^3}{d^2 (d-x)^2}-\frac {e^3}{d^3 (d-x)}-\frac {e^3}{d^3 x}\right ) \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{3 d}+\frac {\left (b^2 e^2 n^2\right ) \operatorname {Subst}\left (\int \frac {1}{x \left (-\frac {d}{e}+\frac {x}{e}\right )^2} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{2 d^2}\\ &=-\frac {b^2 e^3 n^2 \sqrt {x}}{3 d^3}+\frac {b^2 e^2 n^2 x}{6 d^2}+\frac {b^2 e^4 n^2 \log \left (d+\frac {e}{\sqrt {x}}\right )}{3 d^4}+\frac {b e^3 n \left (d+\frac {e}{\sqrt {x}}\right ) \sqrt {x} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{d^4}-\frac {b e^2 n x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{2 d^2}+\frac {b e n x^{3/2} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{3 d}+\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2+\frac {b^2 e^4 n^2 \log (x)}{6 d^4}+\frac {\left (b e^3 n\right ) \operatorname {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{-\frac {d}{e}+\frac {x}{e}} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d^4}-\frac {\left (b e^4 n\right ) \operatorname {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d^4}+\frac {\left (b^2 e^2 n^2\right ) \operatorname {Subst}\left (\int \left (\frac {e^2}{d (d-x)^2}+\frac {e^2}{d^2 (d-x)}+\frac {e^2}{d^2 x}\right ) \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{2 d^2}-\frac {\left (b^2 e^3 n^2\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {d}{e}+\frac {x}{e}} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d^4}\\ &=-\frac {5 b^2 e^3 n^2 \sqrt {x}}{6 d^3}+\frac {b^2 e^2 n^2 x}{6 d^2}+\frac {5 b^2 e^4 n^2 \log \left (d+\frac {e}{\sqrt {x}}\right )}{6 d^4}+\frac {b e^3 n \left (d+\frac {e}{\sqrt {x}}\right ) \sqrt {x} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{d^4}-\frac {b e^2 n x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{2 d^2}+\frac {b e n x^{3/2} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{3 d}-\frac {e^4 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{2 d^4}+\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2+\frac {b e^4 n \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right ) \log \left (-\frac {e}{d \sqrt {x}}\right )}{d^4}+\frac {11 b^2 e^4 n^2 \log (x)}{12 d^4}-\frac {\left (b^2 e^4 n^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{d}\right )}{x} \, dx,x,d+\frac {e}{\sqrt {x}}\right )}{d^4}\\ &=-\frac {5 b^2 e^3 n^2 \sqrt {x}}{6 d^3}+\frac {b^2 e^2 n^2 x}{6 d^2}+\frac {5 b^2 e^4 n^2 \log \left (d+\frac {e}{\sqrt {x}}\right )}{6 d^4}+\frac {b e^3 n \left (d+\frac {e}{\sqrt {x}}\right ) \sqrt {x} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{d^4}-\frac {b e^2 n x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{2 d^2}+\frac {b e n x^{3/2} \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{3 d}-\frac {e^4 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{2 d^4}+\frac {1}{2} x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2+\frac {b e^4 n \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right ) \log \left (-\frac {e}{d \sqrt {x}}\right )}{d^4}+\frac {11 b^2 e^4 n^2 \log (x)}{12 d^4}+\frac {b^2 e^4 n^2 \text {Li}_2\left (1+\frac {e}{d \sqrt {x}}\right )}{d^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.23, size = 321, normalized size = 1.11 \[ \frac {1}{6} \left (\frac {b e n \left (2 a d^3 x^{3/2}-3 a d^2 e x-6 a e^3 \log \left (d \sqrt {x}+e\right )+6 a d e^2 \sqrt {x}+2 b d^3 x^{3/2} \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )-3 b d^2 e x \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )-6 b e^3 \log \left (d \sqrt {x}+e\right ) \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )+6 b d e^2 \sqrt {x} \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )+b d^2 e n x-6 b e^3 n \text {Li}_2\left (\frac {\sqrt {x} d}{e}+1\right )+3 b e^3 n \log ^2\left (d \sqrt {x}+e\right )+8 b e^3 n \log \left (d+\frac {e}{\sqrt {x}}\right )+3 b e^3 n \log \left (d \sqrt {x}+e\right )-6 b e^3 n \log \left (d \sqrt {x}+e\right ) \log \left (-\frac {d \sqrt {x}}{e}\right )-5 b d e^2 n \sqrt {x}+4 b e^3 n \log (x)\right )}{d^4}+3 x^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.46, size = 0, normalized size = 0.00 \[ {\rm integral}\left (b^{2} x \log \left (c \left (\frac {d x + e \sqrt {x}}{x}\right )^{n}\right )^{2} + 2 \, a b x \log \left (c \left (\frac {d x + e \sqrt {x}}{x}\right )^{n}\right ) + a^{2} x, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \log \left (c {\left (d + \frac {e}{\sqrt {x}}\right )}^{n}\right ) + a\right )}^{2} x\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.09, size = 0, normalized size = 0.00 \[ \int \left (b \ln \left (c \left (d +\frac {e}{\sqrt {x}}\right )^{n}\right )+a \right )^{2} x\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {1}{2} \, b^{2} n^{2} x^{2} \log \left (d \sqrt {x} + e\right )^{2} - \int -\frac {2 \, {\left (b^{2} d \log \relax (c)^{2} + 2 \, a b d \log \relax (c) + a^{2} d\right )} x^{2} - {\left (b^{2} d n x^{2} - 4 \, {\left (b^{2} d \log \relax (c) + a b d\right )} x^{2} - 4 \, {\left (b^{2} e \log \relax (c) + a b e\right )} x^{\frac {3}{2}} + 4 \, {\left (b^{2} d x^{2} + b^{2} e x^{\frac {3}{2}}\right )} \log \left (x^{\frac {1}{2} \, n}\right )\right )} n \log \left (d \sqrt {x} + e\right ) + 2 \, {\left (b^{2} d x^{2} + b^{2} e x^{\frac {3}{2}}\right )} \log \left (x^{\frac {1}{2} \, n}\right )^{2} + 2 \, {\left (b^{2} e \log \relax (c)^{2} + 2 \, a b e \log \relax (c) + a^{2} e\right )} x^{\frac {3}{2}} - 4 \, {\left ({\left (b^{2} d \log \relax (c) + a b d\right )} x^{2} + {\left (b^{2} e \log \relax (c) + a b e\right )} x^{\frac {3}{2}}\right )} \log \left (x^{\frac {1}{2} \, n}\right )}{2 \, {\left (d x + e \sqrt {x}\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int x\,{\left (a+b\,\ln \left (c\,{\left (d+\frac {e}{\sqrt {x}}\right )}^n\right )\right )}^2 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \left (a + b \log {\left (c \left (d + \frac {e}{\sqrt {x}}\right )^{n} \right )}\right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________